package entity.weapon;

import entity.characters.Character;

/**
 * 
 * @author Jevgeni Krutov
 *
 */
public abstract class Weapon {
	protected int ammo;
	protected Character host;
	
	private long waitInterval;

	public Weapon(int shotsRemaining, Character host, long waitInterval) {
		this.ammo = shotsRemaining;
		this.host = host;
		this.waitInterval = waitInterval;
	}
	
	public long getWaitInterval() {
		return waitInterval;
	}

	public void addAmmo(int amount) {
		ammo += amount;
	}
	
	public int getAmmo() {
		return ammo;
	}
	
	public abstract Shot emitShot(long elapsedTime);
	
	protected void decrementAmmo() {
		ammo -= 1;
	}
}